﻿using MongoDB.Bson.Serialization.Attributes;
using System.Collections.Generic;

namespace ApiManage.Models.MongoMappings.Sys
{
    /// <summary>
    /// 
    /// </summary>
    public class SysUser : BaseMongoRecord
    {
        /// <summary>
        /// 登录账号
        /// </summary>
        public string LoginName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string LoginPwd { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 角色Id
        /// </summary>
        public string RoleId { get; set; }
        /// <summary>
        /// 角色Id
        /// </summary>
        public string RoleName { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string HeadImg { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int Mark { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 用户菜单
        /// </summary>
        [BsonIgnore]
        public List<SysMenu> UserRole { get; set; }
        /// <summary>
        /// 用户菜单
        /// </summary>
        [BsonIgnore]
        public List<MenuTree> UserMenu { get; set; }
        /// <summary>
        /// 用户按钮
        /// </summary>
        [BsonIgnore]
        public List<SysButton> UserButton { get; set; }
        /// <summary>
        /// 用户列
        /// </summary>
        [BsonIgnore]
        public List<SysColumn> UserColumn { get; set; }
    }

    /// <summary>
    /// /
    /// </summary>
    public class SysUserExtend : SysUser
    {
        /// <summary>
        /// /
        /// </summary>
        public new string Id { get; set; }
    }
    /// <summary>
    /// /
    /// </summary>
    public class MenuTree
    {
        /// <summary>
        /// 
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// /
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// /
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// /
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// /
        /// </summary>
        public List<MenuTree> Children { get; set; }
    }
}
